﻿using Crawler.Common;
using Crawler.Core;
using Crawler.Model.SystemDefault;
using Microsoft.EntityFrameworkCore;
using Model.DefaultApp;
using System;
using System.Collections.Generic;
using System.Text;

namespace Crawler.Framework
{
    public class MyDbContext:DefaultDbContext
    {

        public DbSet<DefaultPageInfoModel> DefaultPageInfos { get; set; }

        public MyDbContext() : base()
        {

        }

        public MyDbContext(DbContextOptions<MyDbContext> options) : base(options)
        {

        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            base.OnConfiguring(optionsBuilder);
            optionsBuilder.UseMySQL(Constant.AppSetting.DefaultDataConstr);

        }
    }
}
